package com.ruoyi.web.sso.api;

import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.web.sso.domain.Alliance;
import com.ruoyi.web.sso.service.IAllianceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 加盟信息Controller
 * 
 * @author ruoyi
 * @date 2022-01-08
 */
@Controller
@RequestMapping("/api/sso/alliance")
@Api(tags = "加盟接口")
public class ApiAllianceController extends BaseController
{

    @Autowired
    private IAllianceService allianceService;

    /**
     * 新增保存加盟信息
     */
    @Log(title = "加盟信息", businessType = BusinessType.INSERT)
    @PostMapping("/add")
    @ResponseBody
    @ApiOperation(value="添加加盟信息",notes="添加加盟信息")
    public AjaxResult addSave(Alliance alliance)
    {
        return toAjax(allianceService.insertAndUpdateAlliance(alliance));
    }

}
